package io.renren.modules.bookManagement.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.renren.common.service.impl.CrudServiceImpl;
import io.renren.modules.bookManagement.dao.KnowledgeDao;
import io.renren.modules.bookManagement.dto.KnowledgeDTO;
import io.renren.modules.bookManagement.entity.KnowledgeEntity;
import io.renren.modules.bookManagement.service.KnowledgeService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * 出版常识管理
 *
 * @author Mark sunlightcs@gmail.com
 * @since 1.0.0 2022-12-09
 */
@Service
public class KnowledgeServiceImpl extends CrudServiceImpl<KnowledgeDao, KnowledgeEntity, KnowledgeDTO> implements KnowledgeService {

    @Override
    public QueryWrapper<KnowledgeEntity> getWrapper(Map<String, Object> params){
        String id = (String)params.get("id");

        QueryWrapper<KnowledgeEntity> wrapper = new QueryWrapper<>();
        wrapper.eq(StringUtils.isNotBlank(id), "id", id);

        return wrapper;
    }


}